home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #9 / Amiga Plus CD - 2004 - No. 09.iso / amigaplus / tools / dev_libs / feelin040718 / sources / dataspace / project.c < prev    next >
C/C++ Source or Header  |  2004-08-03  |  2KB  |  96 lines

  1. ;/*
  2.    F_Create.rexx LIB Feelin:LIBS/Feelin/Dataspace.fc 1 04
  3.    Quit
  4. */
  5.  
  6. #include "Private.h"
  7.  
  8. struct FeelinBase                  *FeelinBase;
  9. struct Library                     *IFFParseBase;
  10.  
  11. ///METHODS
  12. F_METHOD(void,DS_New);
  13. F_METHOD(void,DS_Dispose);
  14. F_METHOD(void,DS_Add);
  15. F_METHOD(void,DS_Remove);
  16. F_METHOD(void,DS_Find);
  17. F_METHOD(void,DS_Clear);
  18. F_METHOD(void,DS_WriteIFF);
  19. F_METHOD(void,DS_ReadIFF);
  20. //+
  21.  
  22. ///EXIT
  23. F_EXIT()
  24. {
  25.    if (IFFParseBase)
  26.    {
  27.       CloseLibrary(IFFParseBase);   IFFParseBase  = NULL;
  28.    }
  29. }
  30. //+
  31. ///INIT
  32. F_INIT()
  33. {
  34.    if (IFFParseBase = OpenLibrary("iffparse.library",40L))
  35.    {
  36.       return TRUE;
  37.    }
  38.    return FALSE;
  39. }
  40. //+
  41. ///QUERY
  42. F_QUERY()
  43. {
  44.    FeelinBase = Feelin;
  45.  
  46.    switch (Which)
  47.    {
  48.       case FV_Query_ClassTags:
  49.       {
  50.          static struct FeelinDynamicEntry Methods[] =
  51.          {
  52.             "Add",0, "Remove",0, "Find",0, "Clear",0, "Merge",0,
  53.             "ReadIFF",0, "WriteIFF",0, NULL
  54.          };
  55.  
  56.          static struct FeelinDynamicEntry Attributes[] =
  57.          {
  58.             "Pool",0, NULL
  59.          };
  60.  
  61.          static struct FeelinMethodEntry Handlers[] =
  62.          {
  63.             (FMethod) DS_New,        0, FM_New,
  64.             (FMethod) DS_Dispose,    0, FM_Dispose,
  65.  
  66.             (FMethod) DS_Add,        (STRPTR) ~FM_Dataspace_Add,        0,
  67.             (FMethod) DS_Remove,     (STRPTR) ~FM_Dataspace_Remove,     0,
  68.             (FMethod) DS_Find,       (STRPTR) ~FM_Dataspace_Find,       0,
  69.             (FMethod) DS_Clear,      (STRPTR) ~FM_Dataspace_Clear,      0,
  70.  
  71.             (FMethod) DS_WriteIFF,   (STRPTR) ~FM_Dataspace_WriteIFF,   0,
  72.             (FMethod) DS_ReadIFF,    (STRPTR) ~FM_Dataspace_ReadIFF,    0,
  73.  
  74.             NULL
  75.          };
  76.  
  77.          static struct TagItem Tags[] =
  78.          {
  79.             FA_Class_LODSize,          (ULONG) sizeof (struct LocalObjectData),
  80.             FA_Class_Methods,          (ULONG) Methods,
  81.             FA_Class_Attributes,       (ULONG) Attributes,
  82.             FA_Class_MethodsTable,     (ULONG) Handlers,
  83.             
  84.             FA_Class_Init,             (ULONG) FCC_Init,
  85.             FA_Class_Exit,             (ULONG) FCC_Exit,
  86.  
  87.             TAG_DONE
  88.          };
  89.  
  90.          return Tags;
  91.       }
  92.    }
  93.    return NULL;
  94. };
  95. //+
  96.